package com.cz.nongyetongv5.bean;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Dict {

	//对象类型

	public static  List<Kv> getKinds(String[] inner){

		List<Kv> kinds=new ArrayList<Kv>();

		if(Arrays.binarySearch(inner, "1")>=0)
			kinds.add(new Kv(1,"企业"));
		if(Arrays.binarySearch(inner, "2")>=0)
			kinds.add(new Kv(2,"合作社"));
		//		 if(Arrays.binarySearch(inner, "3")>=0)
		//		   kinds.add(new Kv(3,"行业协会"));


		if(Arrays.binarySearch(inner, "4")>=0)
			kinds.add(new Kv(4,"其他"));
		//kinds.add(new Kv(5,"龙头企业"));
		//kinds.add(new Kv(6,"家庭农场"));

		//		 if(Arrays.binarySearch(inner, "8")>=0)
		//		     kinds.add(new Kv(8,"投入品经营店"));

		return kinds;
	}
	public static  List<Kv> getKinds(){
		List<Kv> kinds=new ArrayList<Kv>();

		kinds=new ArrayList<Kv>();
		kinds.add(new Kv(1,"企业"));
		kinds.add(new Kv(2,"合作社"));
		kinds.add(new Kv(3,"行业协会"));
		kinds.add(new Kv(4,"其他"));
		//kinds.add(new Kv(5,"龙头企业"));
		//kinds.add(new Kv(6,"家庭农场"));
		kinds.add(new Kv(7,"种养殖户"));
		kinds.add(new Kv(8,"投入品经营店"));

		return kinds;
	}

	public static  List<Kv> getKinds2(String[] inner){

		List<Kv> kinds=new ArrayList<Kv>();

		if(Arrays.binarySearch(inner, "1")>=0)
			kinds.add(new Kv(1,"企业"));
		if(Arrays.binarySearch(inner, "2")>=0)
			kinds.add(new Kv(2,"合作社"));

		if(Arrays.binarySearch(inner, "7")>=0)
			kinds.add(new Kv(7,"种养殖户"));

		if(Arrays.binarySearch(inner, "4")>=0)
			kinds.add(new Kv(4,"其他"));
		return kinds;
	}
	public static  List<Kv> getKinds2(){
		List<Kv> kinds=new ArrayList<Kv>();

		kinds.add(new Kv(1,"企业"));
		kinds.add(new Kv(2,"合作社"));
		kinds.add(new Kv(7,"种养殖户"));
		kinds.add(new Kv(4,"其他"));
		return kinds;
	}

	//检查项目
	private static  List<Kv> jianchaxiangmu=null;
	public static  List<Kv> getJianchaxiangmu(){
		if(jianchaxiangmu==null){
			jianchaxiangmu=new ArrayList<Kv>();
			jianchaxiangmu.add(new Kv(1,"田头巡查"));
			jianchaxiangmu.add(new Kv(2,"生产记录"));
			jianchaxiangmu.add(new Kv(3,"发放资料"));
			jianchaxiangmu.add(new Kv(4,"投入品检查"));

		}
		return jianchaxiangmu;
	}

}
